/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author stumbledog
 */
@Entity
@Table(name = "nflweekplayer")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Nflweekplayer.findAll", query = "SELECT n FROM Nflweekplayer n"),
    @NamedQuery(name = "Nflweekplayer.findById", query = "SELECT n FROM Nflweekplayer n WHERE n.id = :id"),
    @NamedQuery(name = "Nflweekplayer.findByInjury", query = "SELECT n FROM Nflweekplayer n WHERE n.injury = :injury")})
public class Nflweekplayer implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "injury")
    private Integer injury;
    @JoinColumn(name = "Week_id", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Week weekid;
    @JoinColumn(name = "NFLPlayer_id", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Nflplayer nFLPlayerid;
    @JoinColumn(name = "NFLGame_id", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Nflgame nFLGameid;

    public Nflweekplayer() {
    }

    public Nflweekplayer(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getInjury() {
        return injury;
    }

    public void setInjury(Integer injury) {
        this.injury = injury;
    }

    public Week getWeekid() {
        return weekid;
    }

    public void setWeekid(Week weekid) {
        this.weekid = weekid;
    }

    public Nflplayer getNFLPlayerid() {
        return nFLPlayerid;
    }

    public void setNFLPlayerid(Nflplayer nFLPlayerid) {
        this.nFLPlayerid = nFLPlayerid;
    }

    public Nflgame getNFLGameid() {
        return nFLGameid;
    }

    public void setNFLGameid(Nflgame nFLGameid) {
        this.nFLGameid = nFLGameid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Nflweekplayer)) {
            return false;
        }
        Nflweekplayer other = (Nflweekplayer) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.Nflweekplayer[ id=" + id + " ]";
    }
    
}
